import request from '@/utils/request'

// 查询客户信息列表
export function listCustomer(query) {
  return request({
    url: '/reportworld/customer/list',
    method: 'get',
    params: query
  })
}

// 查询客户信息详细
export function getCustomer(data) {
  return request({
    url: '/reportworld/customer/getCustomer',
    method: 'post',
    data: data
  })
}

// 新增客户信息
export function addCustomer(data) {
  return request({
    url: '/reportworld/customer',
    method: 'post',
    data: data
  })
}

// 修改客户信息
export function updateCustomer(data) {
  return request({
    url: '/reportworld/customer',
    method: 'put',
    data: data
  })
}

// 删除客户信息
export function delCustomer(id, hisVersion) {
  const data = {
    id,
    hisVersion
  };
  return request({
    url: '/reportworld/customer/remove',
    method: 'post',
    data: data
  })
}

// 导出许可文件
export function handleDownLicense(data) {
  return request({
    url: '/reportworld/customer/handleDownLicense',
    data:data,
    method: 'post'
  })
}
// 初始化查询
export function init(data) {
  return request({
    url: '/reportworld/customer/init',
    method: 'post',
    data: data
  })
}
